<template>
  <div class="dashboard">
    <el-row>
      <el-col :span="24"
        ><div class="chart-box grid-content bg-purple-light">
          <iframe :src="src" frameborder="0" class="myiframe"></iframe></div
      ></el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "Dashboard",

  data() {
    return {
      showSessionId: "",
      src: "",
      chartPie: null,
      sensorOK: 0,
      sensorError: 0
    };
  },
  mounted() {
    this.showSessionId = window.location.search;
    // this.src = `../static/html/ditu3.html${this.showSessionId}`;
    // this.src = `../static/html/ditu3.html${this.showSessionId}`;
    // this.initChartPie();
  },
  activated() {
    // 由于给echart添加了resize事件, 在组件激活时需要重新resize绘画一次, 否则出现空白bug
    if (this.chartPie) {
      this.chartPie.resize();
    }
  }
};
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard {
  width: 100%;
  height: 500px;
  margin: 0px;
}
.myiframe {
  width: 95%;
  height: 650px;
  margin: 30px;
}
.el-row {
  margin-top: -10px;
  margin-bottom: -10px;
  .el-col {
    padding-top: 0px;
    padding-bottom: 0px;
  }
}
</style>
